<!--
 * @Author: your name
 * @Date: 2021-05-29 16:57:41
 * @LastEditTime: 2021-05-30 12:46:21
 * @LastEditors: Please set LastEditors
 * @Description: In User Settings Edit
 * @FilePath: \EXAM\recruit-vue\src\components\HelloWorld.vue
-->
<template>
  <div class="hello">
    <el-row>
      <el-button disabled>默认按钮</el-button>
      <el-button type="primary" @click="login">登录</el-button>
      <el-button type="success" disabled>成功按钮</el-button>
      <el-button type="info" disabled>信息按钮</el-button>
      <el-button type="warning" disabled>警告按钮</el-button>
      <el-button type="danger" disabled>危险按钮</el-button>
    </el-row>
  </div>
</template>

<script>
export default {
  name: 'HelloWorld',
  data () {
    return {
      msg: 'Welcome to Your Vue.js App',
      data: {
          email: '2570304823@qq.com',
          pass: '123456'
      }
    }
  },
  methods: {
    // 点击重置按钮，重置登录表单
    resetLoginForm() {
      // console.log(this);
      this.$refs.loginFormRef.resetFields()
    },
    login() {
    console.log(123456)
    let param = new URLSearchParams()
    param.append('email', this.data.email)
    param.append('password', this.data.pass)
    // this.axiosRequest.('api/login', param).then((res)=> {
    //   console.log(res,this.data);
    // })
    this.axiosRequest({
        method: 'post',
        url: '/api/login',
        contentType: 'application/x-www-form-urlencoded',
        data: param
      }).then((res) => {
        console.log(res, 1233)
      })
  }}
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
h1, h2 {
  font-weight: normal;
}
ul {
  list-style-type: none;
  padding: 0;
}
li {
  display: inline-block;
  margin: 0 10px;
}
a {
  color: #42b983;
}
</style>
